import React,{Component} from 'react'
import { HashRouter,Route,Switch } from 'react-router-dom'

import App from '../app'
import Monitor from './monitor'
import Pmml from './pmml'
import Service from './service'
import DataSource from './datasource'
import Training from './training'
import NoMatch from './nomatch'

class Router extends Component {
    render() {
        return (
            <HashRouter>
                <App>
                    <Switch>
                        <Route path="/" exact component={Monitor} />
                        <Route path="/dataSource" component={DataSource} />
                        <Route path="/service" component={Service} />
                        <Route path="/model" component={Pmml} />
                        <Route path="/training" component={Training} />
                        <Route path="*" component={NoMatch} />
                    </Switch>
                </App>
            </HashRouter>
        )
    }
}

export default Router
